import { useDispatch, useSelector } from 'react-redux'
import { minus, minusAsync } from '../store/action'

export default function Women() {
  const count = useSelector((state) => state)
  const dispatch = useDispatch()
  return (
    <div>
      <h3>女人组件</h3>
      <div>金钱：{count} </div>
      <button onClick={() => dispatch(minus(9999))}>买包</button>
      <button onClick={() => dispatch(minusAsync(300))}>做头发</button>
    </div>
  )
}
